package com.example.myapplication.Presenter;

import com.example.mvp.presenter.BasePresenter;
import com.example.myapplication.Bean.Demo;
import com.example.myapplication.model.MainModel;
import com.example.myapplication.view.MainView;

import java.util.List;

public class MainPresenter extends BasePresenter<MainView>implements MainModel.MainCallBack{
   private  MainModel mainModel=new MainModel();

   public void getData(){
       mainModel.getData(this,getLifecycleProvider());
   }


    @Override
    public void showList(List<Demo.DatasBean> datasBeans) {
       getmView().showList(datasBeans);

    }

    @Override
    public void showError(String error, int code) {
       getmView().showError(error,code);

    }
}
